<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>宽高比 2：1 自适应矩形</title>
    <style>
.box {
  /* border: 1px dashed skyblue;
  width: 50vw; */
  width: 100px;
  background-color: olive;
  overflow: hidden;
}
.box div {
  margin: 50%;
}
    </style>
  </head>
  <body>
<div class="box">
  <div></div>
</div>
  </body>
</html>
